package ua.kharkov.khpi.tarasenko.bach.dao.core.order;

import java.util.ArrayList;

import ua.kharkov.khpi.tarasenko.bach.core.db.EShopDataStoreException;

/**
 * Interface for DAO for working with datasource with items in orders in Derby
 * DB.
 * 
 * @author oleksandr
 * 
 */
public interface OrderItemDAO {

	/**
	 * Adds item to order.
	 * 
	 * @param orderItemDTO
	 *            - specify order's id, item's id and it's quantity.
	 * @return rowsAdded - number of inserted rows.
	 * @throws EShopDataStoreException
	 *             if error occurred.
	 */
	public int addItemToOrder(OrderItemDTO orderItemDTO)
			throws EShopDataStoreException;

	public ArrayList<OrderItemDTO> getItemsInOrder(int orderId)
			throws EShopDataStoreException;
}
